package study;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

/**
 * Created by xux on 14-3-6.
 */
@Path("/say")
public class Say {

    @GET
    @Path("/say1")
    @Produces("text/plain")
    public String say1(){
        System.out.println(this);
        return "helloword!";
    }

    @GET
    @Path("/say2/{name}")
    @Produces("text/plain")
    public String say2(@PathParam("name")String name){
        System.out.println(this);
        return "hello "+name+"!";
    }
}
